﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;

namespace DotNetStar.TheKing.Web
{
    public enum StatusCodeEnums
    {
        BadRequest = 400,
        ServerInternalError=500,
    }

    public class ApiStatusResult : JsonResult
    {
        public ApiStatusResult(StatusCodeEnums statusCode):this(statusCode,null)
        {

        }

        public ApiStatusResult(StatusCodeEnums statusCode,IEnumerable<string> messages) : base(new {messages })
        {
            base.StatusCode = (int)statusCode;
        }
    }
}
